<%--
  User: ChandraSekhar
  Date: Fed 05, 2010
  Time: 2:52:55 PM
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%@ page import="com.scalar.chiptrack.commons.Constants,
                 com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<chiptrack:checkLogon sourcePage="/costCodeSetup.do?action=waferPkgCost" />
<%String chipTracContext = "/" + ConfigManager.getChipTracContext(); /*try {*/ %>

<HTML>
<HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet"></HEAD>
<BODY bgColor="#ffffff" leftMargin="0" topMargin="0" marginheight="0" marginwidth="0">

<script src="<%=chipTracContext%>/jsp/includes/scripts/functions.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/validations.js"></script>
<script src="<%=chipTracContext%>/jsp/includes/scripts/quickSearch.js"></script>

<SCRIPT language="JavaScript">
    window.onload = init;
    var listSize=0;

    function init()
    {
        qs_1 = new QuickSearch( document.costCodeSetupForm.processStepId, document.costCodeSetupForm.qs1, false );
    }
    function reset()
    {
        document.costCodeSetupForm.reset();
        qs_1.resetQuickSearchCntrl();
    }
    
    function searchPage()
    {
        var form    = document.costCodeSetupForm;
		var pa = document.getElementById("errors");
		pa.innerHTML = "";
		var a1 = document.costCodeSetupForm.processStepId.value.trim();
		if ( ( a1 == '' ) || ( a1 == '0' ) || ( a1 == '-1' ) )
		{
			pa.innerHTML = "<li> Please select a Part Number";
			document.costCodeSetupForm.processStepId.focus();
			return;
		}

        form.action = "<%=chipTracContext%>/costCodeSetup.do?action=searchwaferPkgCost";
        form.submit();
    }
    function save()
    {
        var form    = document.costCodeSetupForm;
        form.action = "<%=chipTracContext%>/costCodeSetup.do?action=savewaferPkgCost";
        form.submit();
    }
    function submitReport(type)
    {
         var form    = document.costCodeSetupForm;
         if ( type == 1 )
         {
            form.action = "<%=chipTracContext%>/costCodeSetup.do?action=fgStdCostReport";
         }
         else if ( type == 2 )
         {
            form.action = "<%=chipTracContext%>/costCodeSetup.do?action=memsStdCostReport";
         }
         else if ( type == 3 )
         {
            form.action = "<%=chipTracContext%>/costCodeSetup.do?action=cmosStdCostReport";
         }
         else if ( type == 4 )
         {
            form.action = "<%=chipTracContext%>/costCodeSetup.do?action=updateViewCostTables";
         }
         else if ( type == 5 )
         {
            form.action = "<%=chipTracContext%>/costCodeSetup.do?action=assyStdCostReport";
         }
        form.submit();

    }
	function updateValues()
	{
		document.costCodeSetupForm.action = '<%=chipTracContext%>/costCodeSetup.do?action=impPrevQtrValues';    
        document.costCodeSetupForm.submit();
	}

    function quickSearchPartNo()
    {
        if ( window.event.keyCode == 13 )
        {
            searchPage();
        }
    }
</SCRIPT>
<!-- Top Header Start-->
<%@ include file="/jsp/includes/header.jsp" %>
<!-- Top Header End-->
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
    <TR>
	    <TD width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
	    <!-- Side Navigation start -->
	    <%@include file="/jsp/finance/finance_menu.jsp" %>
	    <!-- end of the side navigations -->
        </TD>
	    <TD bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
	    <TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
	    <TD valign="top" width="100%"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
	    <BR>
        <html:form action="/costCodeSetup.do?action=waferPkgCost" method="post" name="costCodeSetupForm" type="com.scalar.chiptrack.finance.forms.CostCodeSetupForm">
            
            <TABLE width="80%" align="center" cellpadding="2" cellspacing="2" border="0">
			    <TR><TD colspan="5" class="NArialW" align="center"> Wafer Pkg Cost Setup </TD></TR>
			    <TR><TD colspan='5' class="NArialL"><chiptrack:errors styleClass="NArialL"/><chiptrack:info styleClass="NArialL"/></TD></TR>
			    <TR><TD colspan='5' class="NArialL"><FONT id="errors" color='FF0000'></font></TD></TR>
                <TR><TD colspan='5'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
                <tr>
                    <td class="NArialL" nowrap>
                        Quick Search Part Number:
                    </td>
                    <td class="NArialL">
                        <input type="text" name="qs1" class="txfield" size='20' onkeyup='quickSearch(qs_1);quickSearchPartNo()'/>
                    </td>
                    <td width="5%">&nbsp;</td>
                    <td class="NArialL" width='20%'>
                        &nbsp;
                    </td>
                    <td class="NArialL" width='20%'>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td class="NArialL">
                        Part Number:
                    </td>
                    <td class="NArialL">
                        <html:select name="costCodeSetupForm" property="processStepId"  styleClass="txfield" >
                            <html:option value="0">All Part Number</html:option>
                            <logic:present name="partNumberList">
                                <html:options collection="partNumberList" property="value" labelProperty="label"/>
                            </logic:present>
                        </html:select>
                    </td>
                    <td width="5%">&nbsp;</td>
                    <td class="NArialL" width="10%">
                        &nbsp;
                    </td>
                    <td class="NArialL" align="left">
						&nbsp;
                    </td>
            </tr>
                <tr>
                    <td class="NArialL">
                        Year :
                    </td>
                    <td class="NArialL">
                        <html:select name="costCodeSetupForm" property="year"  styleClass="txfield" >
                            <logic:present name="yearList">
                                <html:options collection="yearList" property="value" labelProperty="label"/>
                            </logic:present>
                        </html:select>
                    </td>
                    <td width="5%">&nbsp;</td>
                    <td class="NArialL" width="10%">
                        Quarter:
                    </td>
                    <td class="NArialL" align="left">
                        <html:select name="costCodeSetupForm" property="quater"  styleClass="txfield">
                            <logic:present name="quarterList">
                                <html:options collection="quarterList" property="value" labelProperty="label"/>
                            </logic:present>
                        </html:select>
                    </td>
            </tr>
            <TR><TD colspan='5'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
            <tr>
				<td colspan="5" align="left">
                    <a class="NArialL" href="javascript:submitReport(1)" onMouseOver="window.status='Click here to FG Std Cost Excel Report';return true" onMouseOut="window.status='';return true" title='Click here to FG Std Cost Excel Report' >FG Std Cost Report</a>
                    &nbsp;&nbsp;&nbsp;
                    <a class="NArialL" href="javascript:submitReport(2)" onMouseOver="window.status='Click here to MEMS Std Cost Excel Report';return true" onMouseOut="window.status='';return true" title='Click here to MEMS Std Cost Excel Report' >MEMS Std Cost Report</a>
                    &nbsp;&nbsp;&nbsp;
                    <a class="NArialL" href="javascript:submitReport(3)" onMouseOver="window.status='Click here to CMOS Std Cost Excel Report';return true" onMouseOut="window.status='';return true" title='Click here to CMOS Std Cost Excel Report' >CMOS Std Cost Report</a>
                    &nbsp;&nbsp;&nbsp;
                    <a class="NArialL" href="javascript:submitReport(5)" onMouseOver="window.status='Click here to Assy Std Cost Excel Report';return true" onMouseOut="window.status='';return true" title='Click here to ASSY Std Cost Excel Report' >ASSY Std Cost Report</a>
                    &nbsp;&nbsp;&nbsp;
                    <a class="NArialL" href="javascript:submitReport(4)" onMouseOver="window.status='Click here to Update Costs';return true" onMouseOut="window.status='';return true" title='Click here to Update the costs' >Update Costs</a>
                </td>
			</tr>
            <TR><TD colspan='5'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
			<tr>
				<td colspan="5" align="center">
                    <a href="javascript:searchPage()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/search.gif" width="53" height="17" onmouseover="window.status='Click to Search Wafer Pkg Costs ';return true" onmouseout="window.status='';return true" title="Click here to Search Wafer Pkg Cost" alt=""></a>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				    <a href="javascript:reset();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17" onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true" title="Click here to Reset"></a>
				</td>
			</tr>

            <TR><TD colspan='5'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
            <nested:present property="costCodeList">
            <nested:size id="listSize" property="costCodeList"/>
                <script type="text/javascript">
                    listSize=<%=listSize.intValue() %>;
                </script>
            <logic:greaterThan value="0" name="listSize" >
            <tr>
                <td colspan="5"  >
                    <table width="100%">
						<logic:equal name="costCodeSetupForm" property="processType" value="Assembly">
							<tr bgcolor="#993333">
								<%--<td align="center" class="NArialL"><font color="#FFFFFF">Select </font></td>--%>
								<td align="center" nowrap class="NArialL"><font color="#FFFFFF">Part Number</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Package</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Die Cost(CMOS)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Die Cost(MEMS)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Pkg Cost</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Assm Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Time(sec)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Cost/sec</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Cost (Y)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Cost (T)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Bulk</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Cumm FG Part Cost</font></td>
							</tr>
		                    <nested:iterate id="costInfo" property="costCodeList" indexId="iterateIdx" type="com.scalar.chiptrack.finance.CostCodeInfo" >
				            <tr bgcolor=<%=iterateIdx.intValue() % 2 == 0 ? "'#FFFFEE'" : "'#DEE1E2'"%> >
								<nested:hidden name="costInfo" property="fabProcessStepId"/>
								<nested:hidden name="costInfo" property="partNumber"/>
								<nested:hidden name="costInfo" property="pkg"/>
								<td align="center" class="NArialL" ><nested:write property="partNumber"/></td>
								<td align="center" class="NArialL" ><nested:write  property="pkg"/></td>
								<td align = "center" class='NArialL'><nested:write property="cmosWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:write property="memsWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="assyCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,4)" onkeyup="javascript:restrictAmt(this,3,3)" onfocus="javascript:this.select();" size = "7" property ="yieldAssy"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="testTimeInSec"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="testCostPerSec"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,3)" onkeyup="javascript:restrictAmt(this,3,3)" onfocus="javascript:this.select();" size = "7" property ="yieldTest"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="trCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="trCostT"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="bulk"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,3)" onkeyup="javascript:restrictAmt(this,4,3)" onfocus="javascript:this.select();" size = "7" property ="yield"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="cummCostPerDie"/></td>
							</tr>
	                    </nested:iterate>
					</logic:equal>
					<logic:equal name="costCodeSetupForm" property="processType" value="Finished Goods">
							<tr bgcolor="#993333">
								<%--<td align="center" class="NArialL"><font color="#FFFFFF">Select </font></td>--%>
								<td align="center" nowrap class="NArialL"><font color="#FFFFFF">Part Number</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Package</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Die Cost(CMOS)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Die Cost(MEMS)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Pkg Cost</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Assm Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Time(sec)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Cost/sec</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Test Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Cost (Y)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Cost (T)</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Bulk</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">T&R Yield%</font></td>
								<td align="center" class="NArialL"><font color="#FFFFFF">Cumm FG Part Cost</font></td>
							</tr>
		                    <nested:iterate id="costInfo" property="costCodeList" indexId="iterateIdx" type="com.scalar.chiptrack.finance.CostCodeInfo" >
				            <tr bgcolor=<%=iterateIdx.intValue() % 2 == 0 ? "'#FFFFEE'" : "'#DEE1E2'"%> >
								<nested:hidden name="costInfo" property="fabProcessStepId"/>
								<nested:hidden name="costInfo" property="partNumber"/>
								<nested:hidden name="costInfo" property="pkg"/>
								<td align="center" class="NArialL" ><nested:write property="partNumber"/></td>
								<td align="center" class="NArialL" ><nested:write  property="pkg"/></td>
								<td align = "center" class='NArialL'><nested:write property="cmosWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:write property="memsWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="assyCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,4)" onkeyup="javascript:restrictAmt(this,3,3)" onfocus="javascript:this.select();" size = "7" property ="yieldAssy"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="testTimeInSec"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="testCostPerSec"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,3)" onkeyup="javascript:restrictAmt(this,3,3)" onfocus="javascript:this.select();" size = "7" property ="yieldTest"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="trCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="trCostT"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="bulk"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,3,3)" onkeyup="javascript:restrictAmt(this,4,3)" onfocus="javascript:this.select();" size = "7" property ="yield"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="cummCostPerDie"/></td>
							</tr>
	                    </nested:iterate>
					</logic:equal>

					<logic:equal name="costCodeSetupForm" property="processType" value="Die Bank">
                        <tr bgcolor="#993333">
                            <td align="center" nowrap class="NArialL"><font color="#FFFFFF">Part Number</font></td>
                            <td align="center" nowrap class="NArialL"><font color="#FFFFFF">GDW</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Wafer Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Back Grind Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Total Wafer Cost</font></td>
							<td align="center" class="NArialL"><font color="#FFFFFF">Cumm Cost Per Die</font></td>
                        </tr>
		                <nested:iterate id="costInfo" property="costCodeList" indexId="iterateIdx" type="com.scalar.chiptrack.finance.CostCodeInfo" >
				            <tr bgcolor=<%=iterateIdx.intValue() % 2 == 0 ? "'#FFFFEE'" : "'#DEE1E2'"%> >
								<nested:hidden name="costInfo" property="fabProcessStepId"/>
								<nested:hidden name="costInfo" property="partNumber"/>
								<nested:hidden name="costInfo" property="pkg"/>
								<td align="center" class="NArialL" ><nested:write property="partNumber"/></td>
								<td align="center" class="NArialL" ><nested:write property="gdw"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="waferCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="bgCost"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="totalWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="cummCostPerDie"/></td>
							</tr>
						</nested:iterate>
					</logic:equal>
					<logic:equal name="costCodeSetupForm" property="processType" value="MEMS">
                        <tr bgcolor="#993333">
                            <td align="center" nowrap class="NArialL"><font color="#FFFFFF">Part Number</font></td>
	                        <td align="center" nowrap class="NArialL"><font color="#FFFFFF">GDW</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Raw Wafer Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">ZRO_EXP2 Cost</font></td>
	                        <td align="center" class="NArialL"><font color="#FFFFFF">EPI_VT Cost</font></td>
	                        <td align="center" class="NArialL"><font color="#FFFFFF">VN_EXP Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Epi Seal Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Fab Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Pre Grind Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Back Grind Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Back Grind Yield%</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Sort Cost</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Sort Yield%</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Mix Match Yield%</font></td>
                            <td align="center" class="NArialL"><font color="#FFFFFF">Total Wafer Cost</font></td>
							<td align="center" class="NArialL"><font color="#FFFFFF">Cumm Cost Per Die</font></td>
                        </tr>
	                    <nested:iterate id="costInfo" property="costCodeList" indexId="iterateIdx" type="com.scalar.chiptrack.finance.CostCodeInfo" >
				            <tr bgcolor=<%=iterateIdx.intValue() % 2 == 0 ? "'#FFFFEE'" : "'#DEE1E2'"%> >
					           <nested:hidden name="costInfo" property="fabProcessStepId"/>
							   <nested:hidden name="costInfo" property="partNumber"/>
								<nested:hidden name="costInfo" property="pkg"/>
								<td align="center" class="NArialL" ><nested:write property="partNumber"/></td>
								<td align="center" class="NArialL" ><nested:write property="gdw"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="raw_wafer_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="zro_exp2_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="epi_vt_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="vn_exp_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="epi_seal_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="waferCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="pre_grind_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="bgCost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="bg_yield"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="sort_Cost"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="sort_yield"/></td>
								<td align = "center" class='NArialL'><nested:text name="costInfo" styleClass = "valuetxfield" onkeypress="javascript:restrictCharacters(this,5,4)" onkeyup="javascript:restrictAmt(this,5,4)" onfocus="javascript:this.select();" size = "7" property ="mixmatch_yield"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="totalWaferCost"/></td>
								<td align = "center" class='NArialL'><nested:write name="costInfo" property ="cummCostPerDie"/></td>
							</tr>
						</nested:iterate>
					</logic:equal>
                    </table>
                </td></tr>
				<TR>
						<td colspan="3">&nbsp;</td><td colspan="2" class="NArialL">
						    <chiptrack:restrictedLink functionality='<%=Functionality.COST_CODES_SETUP %>' action='<%=User.USER_ACTION_MODIFY%>' styleClass="leftsection" href='javascript:updateValues();' onmouseover="window.status='Click to import previous Quarter Values';return true" onmouseout="window.status='';return true">
                            click here
							</chiptrack:restrictedLink> to import previous Quarter Values
						</td>
				</tr>

            <TR><TD colspan='5'><IMG src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height='10'></TD></TR>
            <tr>
                <td colspan="5" align="center">
                    <a href="javascript:save()"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17" onmouseover="window.status='Click to Search Wafer Product Pkg Cost';return true" onmouseout="window.status='';return true" title="Click here to save Wafer Product Pkg Cost Setup " alt=""></a>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="javascript:reset();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17" onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true" title="Click here to Reset"></a>
                </td>
            </tr>
            </logic:greaterThan>
        </nested:present>
        </TABLE>
	</html:form>
<!-- till here -->
<BR><BR><BR></TD>
<TD bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></TD>
</TR>
</TABLE>

<!-- Footer starts here -->
<%@ include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->

</BODY>
</HTML>

<%--
<%
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
%>
--%>
